package com.spmsys.entity.spmsys;

import java.util.regex.Pattern;

public class Clazz {
    private String id;
    private String owner;
    private String createBy;
    private String updateBy;
    private Long createAt;
    private Long updateAt;
    private String clazzId;
    private String name;
    private String mainInCharge;
    private String college;
    private String major;

    public String getId() {
        return id;
    }

    public String getOwner() {
        return owner;
    }

    public String getCreateBy() {
        return createBy;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public Long getCreateAt() {
        return createAt;
    }

    public Long getUpdateAt() {
        return updateAt;
    }

    public String getClazzId() {
        return clazzId;
    }

    public String getName() {
        return name;
    }

    public String getMainInCharge() {
        return mainInCharge;
    }

    public String getCollege() {
        return college;
    }

    public String getMajor() {
        return major;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public void setCreateAt(Long createAt) {
        this.createAt = createAt;
    }

    public void setUpdateAt(Long updateAt) {
        this.updateAt = updateAt;
    }

    public void setClazzId(String clazzId) {
        String regex = "^[0-9]{4}$";
        if (clazzId != null && !Pattern.matches(regex, clazzId)) {
            throw new RuntimeException("clazzId格式错误，正则：" + regex);
        }
        this.clazzId = clazzId;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setMainInCharge(String mainInCharge) {
        this.mainInCharge = mainInCharge;
    }

    public void setCollege(String college) {
        this.college = college;
    }

    public void setMajor(String major) {
        this.major = major;
    }
}
